<%= header %>
<%= boomerangScript %>
<script src="32-xhr-simple-filters.js" type="text/javascript"></script>
<script>
BOOMR_test.init({
	instrument_xhr: true,
	AutoXHR: {
		alwaysSendXhr: true,
		excludeFilters: [{
			cb: function(anchor) {
				var url = anchor.href, result;
				if (url && typeof url === "string") {
					result = url.match(/img\.jpg$/g);
					if (result && result.length > 0) {
						return true;
					}
				}
				return false;
			},
			ctx: null,
			name: "32-xhr-simple-filter"
		}]
	},
	testAfterOnBeacon: BOOMR.plugins.AutoXHR ? 2 : 1,
	afterFirstBeacon: function() {
		if (!BOOMR.plugins.AutoXHR) {
			return;
		}
		setTimeout(function() {
			var xhr1 = new XMLHttpRequest();
			xhr1.open("GET", "/pages/07-autoxhr/support/img.jpg");
			xhr1.send(null);

			xhr1.addEventListener("load", function() {
				var xhr2 = new XMLHttpRequest();
				xhr2.open("GET", "/pages/07-autoxhr/support/script200.js");
				xhr2.send(null);
			});
		}, 100);
	}
});
</script>
